package com.ymatou.query.trading.api.testcase;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;

import org.junit.After;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
import org.junit.experimental.categories.Category;

import com.ymatou.query.trading.api.parameter.ExistsSellerOrderListBean;
import com.ymatou.query.trading.api.parameter.GetSellerOrderListCountBean;
import com.ymatou.query.trading.api.parameter.PackageDeliveryDomesticStatusFilter;
import com.ymatou.query.trading.api.parameter.resp.ExistsSellerOrderListResp;
import com.ymatou.query.trading.api.parameter.resp.GetSellerOrderListCountResp;
import com.ymatou.query.trading.api.service.ExistsSellerOrderListCall;
import com.ymt.core.tool.Logger;
import com.ymt.utils.annotation.TestCase;
import com.ymt.utils.annotation.TestSuite;
import com.ymt.utils.tag.P1;
import com.ymt.utils.tag.P2;
import com.ymt.utils.tag.P3;
import com.ymttest.common.enums.LogisticsTypeEnum;
import com.ymttest.common.enums.OrderDateEnum;
import com.ymttest.common.enums.OrderStatusEnum;
import com.ymttest.common.enums.OrderTypeEnum;
import com.ymttest.utils.DataUtil;
import com.ymttest.utils.EnvSetup;
import com.ymttest.utils.YMTDateUtil;
import com.ymttest.utils.constant.ECode;

/**
 * 获取卖家订单数量 FreeMaker Template自动生成代码
 */
@TestSuite
public class Ts_ExistsSellerOrderList {

	private static ExistsSellerOrderListBean request;
	private static ExistsSellerOrderListCall existsSellerOrderListCall;

	@BeforeClass
	public static void setUp() {
		Logger.createResultFile("获取卖家订单数量");
	}

	@Before
	public void caseUp() {
		request = new ExistsSellerOrderListBean();
		existsSellerOrderListCall = new ExistsSellerOrderListCall();
	}

	@AfterClass
	public static void tearDown() {
		Logger.generateResult(existsSellerOrderListCall.getOpurl());
	}

	@After
	public void caseDown() {
		Logger.end();
	}

	private void verify(){
		ExistsSellerOrderListResp expectResponse = new ExistsSellerOrderListResp();
		constructExpectedResponse(expectResponse);
		ExistsSellerOrderListResp actualResponse =  existsSellerOrderListCall.getExistsSellerOrderListResp();
		Map<String,Boolean> expect = expectResponse.getAllRecordCountDic();
		Map<String,Boolean> actual = actualResponse.getAllRecordCountDic();
		if(expect == null){
			DataUtil.verify(null, actual, "验证AllRecordCountDic == null");
		}else{
			boolean sameSize = expect.size()==actual.size();
			DataUtil.verify(expect.size(), actual.size(), "验证AllRecordCountDic.size()");
			if(sameSize){
				Iterator<String> it = expect.keySet().iterator();
				while(it.hasNext()){
					String expKey = it.next();
					boolean expValue = expect.get(expKey);
					boolean exist = actual.containsKey(expKey);
					DataUtil.verify(true, exist, "验证AllRecordCountDic中是否存在状态: ["+expKey+"]");
					if(exist){
						DataUtil.verify(expValue, actual.get(expKey), "验证AllRecordCountDic中状态为["+expKey+"]的bool值");
					}
				}
			}
		}
	}
	
	private void constructExpectedResponse(ExistsSellerOrderListResp response){
		GetSellerOrderListCountResp result = execute();
		Map<String,Boolean> dict = new HashMap<String, Boolean>();
		if(result != null && result.getAllRecordCountDic() != null && result.getAllRecordCountDic().size()>0){
			Iterator<String> it = result.getAllRecordCountDic().keySet().iterator();
			while(it.hasNext()){
				String key = it.next();
				int value = result.getAllRecordCountDic().get(key);
				dict.put(key, value>0);
			}
		}
		response.setAllRecordCountDic(dict);
	}
	
	private GetSellerOrderListCountResp execute(){
		GetSellerOrderListCountResp resp = new GetSellerOrderListCountResp();
		GetSellerOrderListCountBean bean = GetArguments();
		new Ts_GetSellerOrderListCount().constructExpectedResponse(bean, resp);
		return resp;
	}
	
	private static GetSellerOrderListCountBean GetArguments(){
		GetSellerOrderListCountBean bean = new GetSellerOrderListCountBean();
		bean.setBeginTime(request.getBeginTime());
		bean.setEndTime(request.getEndTime());
		bean.setIsShangouOrder(request.getIsShangouOrder());
		bean.setLogisticsTypeList(request.getLogisticsTypeList());
		bean.setOrderDateEnum(request.getOrderDateEnum());
		bean.setOrderStatusList(request.getOrderStatusList());
		bean.setOrderTypeList(request.getOrderTypeList());
		bean.setOverTimeLimitDic(request.getOverTimeLimitDic());
		bean.setSalesRefundOrderOnly(request.isSalesRefundOrderOnly());
		bean.setSearchKeyWord(request.getSearchKeyWord());
		bean.setSellerId(request.getSellerId());
		return bean;
	}
	
	
	@Test
	@Category(P1.class)
	@TestCase
	public void Tc_ExistsSellerOrderList_001() {
		Logger.start(true,"获取卖家非闪购订单数量成功");
		try {
			int SellerId = Integer.valueOf(EnvSetup.getData("SellerId"));
			// 参数
			String BeginTime = YMTDateUtil.getBeforeOrNextDay(-100,YMTDateUtil.YMDTHMS_STRING);
			request.setBeginTime(BeginTime);
			String EndTime = YMTDateUtil.getBeforeOrNextDay(0,YMTDateUtil.YMDTHMS_STRING);
			request.setEndTime(EndTime);
			// 闪购
			request.setIsShangouOrder(false);
			// 物流类型
			ArrayList<Integer> LogisticsTypeList = new ArrayList<Integer>();
			request.setLogisticsTypeList(LogisticsTypeList);
			// 订单时间类型
			request.setOrderDateEnum(OrderDateEnum.CreateDate.getValue());
			// 订单状态
			ArrayList<Integer> OrderStatusList = new ArrayList<Integer>();
			request.setOrderStatusList(OrderStatusList);
			// 订单类型
			ArrayList<Integer> OrderTypeList = new ArrayList<Integer>();
			OrderTypeList.add(0);
			request.setOrderTypeList(OrderTypeList);
			// 订单状态对应的超时时间
			HashMap<Integer, String> map = new HashMap<Integer, String>();
			request.setOverTimeLimitDic(map);
			// 查询关键词
			request.setSearchKeyWord("21");
			// 卖家ID
			request.setSellerId(SellerId);
			request.setPackageDeliveryDomesticStatusFilter(null);
			request.setSalesRefundOrderOnly(false);
			// 发送请求
			existsSellerOrderListCall.setData(request);
			existsSellerOrderListCall.callService();
			Logger.comment("existsSellerOrderListCall send:" + existsSellerOrderListCall.getEntityString());
			Logger.comment("existsSellerOrderListCall response:" + existsSellerOrderListCall.getReturnData());
			Logger.verifyEquals(ECode.SUCCESS, existsSellerOrderListCall.getCode(), "验证Code");
			verify();
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	
	@Test
	@Category(P1.class)
	@TestCase
	public void Tc_ExistsSellerOrderList_002() {
		Logger.start(true,"获取卖家闪购订单数量成功");
		try {
			int SellerId = Integer.valueOf(EnvSetup.getData("SellerId"));
			// 参数
			String BeginTime = YMTDateUtil.getBeforeOrNextDay(-100,YMTDateUtil.YMDTHMS_STRING);
			request.setBeginTime(BeginTime);
			String EndTime = YMTDateUtil.getBeforeOrNextDay(-1,YMTDateUtil.YMDTHMS_STRING);
			request.setEndTime(EndTime);
			// 是否闪购
			request.setIsShangouOrder(true);
			// 物流类型
			ArrayList<Integer> LogisticsTypeList = new ArrayList<Integer>();
			request.setLogisticsTypeList(LogisticsTypeList);
			// 订单时间类型
			request.setOrderDateEnum(OrderDateEnum.Unknown.getValue());
			// 订单状态
			ArrayList<Integer> OrderStatusList = new ArrayList<Integer>();
			request.setOrderStatusList(OrderStatusList);
			// 订单类型
			ArrayList<Integer> OrderTypeList = new ArrayList<Integer>();
			OrderTypeList.add(0);
			request.setOrderTypeList(OrderTypeList);
			// 订单状态对应的超时时间
			HashMap<Integer, String> map = new HashMap<Integer, String>();
			request.setOverTimeLimitDic(map);
			// 查询关键词
			request.setSearchKeyWord("24");
			// 卖家ID
			request.setSellerId(SellerId);
			// 发送请求
			existsSellerOrderListCall.setData(request);
			existsSellerOrderListCall.callService();
			Logger.comment("existsSellerOrderListCall send:" + existsSellerOrderListCall.getEntityString());
			Logger.comment("existsSellerOrderListCall response:" + existsSellerOrderListCall.getReturnData());
			Logger.verifyEquals(ECode.SUCCESS, existsSellerOrderListCall.getCode(), "验证Code");
			verify();
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	@Test
	@Category(P3.class)
	@TestCase
	public void Tc_ExistsSellerOrderList_003() {
		Logger.start(true,"sellerid=null,获取卖家非闪购订单数量成功");
		try {
			int SellerId = Integer.valueOf(EnvSetup.getData("SellerId"));
			// 参数
			String BeginTime = YMTDateUtil.getBeforeOrNextDay(-100,YMTDateUtil.YMDTHMS_STRING);
			request.setBeginTime(BeginTime);
			String EndTime = YMTDateUtil.getBeforeOrNextDay(-1,YMTDateUtil.YMDTHMS_STRING);
			request.setEndTime(EndTime);
			// 闪购
			request.setIsShangouOrder(false);
			// 物流类型
			ArrayList<Integer> LogisticsTypeList = new ArrayList<Integer>();
			request.setLogisticsTypeList(LogisticsTypeList);
			// 订单时间类型
			request.setOrderDateEnum(OrderDateEnum.CreateDate.getValue());
			// 订单状态
			ArrayList<Integer> OrderStatusList = new ArrayList<Integer>();
			request.setOrderStatusList(OrderStatusList);
			// 订单类型
			ArrayList<Integer> OrderTypeList = new ArrayList<Integer>();
			OrderTypeList.add(0);
			request.setOrderTypeList(OrderTypeList);
			// 订单状态对应的超时时间
			HashMap<Integer, String> map = new HashMap<Integer, String>();
			request.setOverTimeLimitDic(map);
			// 查询关键词
			request.setSearchKeyWord("21");
			// 卖家ID
//			request.setSellerId(SellerId);
			request.setPackageDeliveryDomesticStatusFilter(null);
			request.setSalesRefundOrderOnly(false);
			// 发送请求
			existsSellerOrderListCall.setData(request);
			existsSellerOrderListCall.callService();
			Logger.comment("existsSellerOrderListCall send:" + existsSellerOrderListCall.getEntityString());
			Logger.comment("existsSellerOrderListCall response:" + existsSellerOrderListCall.getReturnData());
			Logger.verifyEquals(ECode.SUCCESS, existsSellerOrderListCall.getCode(), "验证Code");
			verify();
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	@Test
	@Category(P3.class)
	@TestCase
	public void Tc_ExistsSellerOrderList_004() {
		Logger.start(true,"什么都不传,获取卖家非闪购订单数量成功");
		try {
			// 发送请求
			existsSellerOrderListCall.setData(request);
			existsSellerOrderListCall.callService();
			Logger.comment("existsSellerOrderListCall send:" + existsSellerOrderListCall.getEntityString());
			Logger.comment("existsSellerOrderListCall response:" + existsSellerOrderListCall.getReturnData());
			Logger.verifyEquals(ECode.SUCCESS, existsSellerOrderListCall.getCode(), "验证Code");
			verify();
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	@Test
	@Category(P3.class)
	@TestCase
	public void Tc_ExistsSellerOrderList_005() {
		Logger.start(true,"开始时间大于结束时间,获取卖家非闪购订单数量成功");
		try {
			int SellerId = Integer.valueOf(EnvSetup.getData("SellerId"));
			// 参数
			String BeginTime = YMTDateUtil.getBeforeOrNextDay(1,YMTDateUtil.YMDTHMS_STRING);
			request.setBeginTime(BeginTime);
			String EndTime = YMTDateUtil.getBeforeOrNextDay(-100,YMTDateUtil.YMDTHMS_STRING);
			request.setEndTime(EndTime);
			// 闪购
			request.setIsShangouOrder(false);
			// 物流类型
			ArrayList<Integer> LogisticsTypeList = new ArrayList<Integer>();
			request.setLogisticsTypeList(LogisticsTypeList);
			// 订单时间类型
			request.setOrderDateEnum(OrderDateEnum.CreateDate.getValue());
			// 订单状态
			ArrayList<Integer> OrderStatusList = new ArrayList<Integer>();
			request.setOrderStatusList(OrderStatusList);
			// 订单类型
			ArrayList<Integer> OrderTypeList = new ArrayList<Integer>();
			OrderTypeList.add(0);
			request.setOrderTypeList(OrderTypeList);
			// 订单状态对应的超时时间
			HashMap<Integer, String> map = new HashMap<Integer, String>();
			request.setOverTimeLimitDic(map);
			// 查询关键词
			request.setSearchKeyWord("21");
			// 卖家ID
			request.setSellerId(SellerId);
			request.setPackageDeliveryDomesticStatusFilter(null);
			request.setSalesRefundOrderOnly(false);
			// 发送请求
			existsSellerOrderListCall.setData(request);
			existsSellerOrderListCall.callService();
			Logger.comment("existsSellerOrderListCall send:" + existsSellerOrderListCall.getEntityString());
			Logger.comment("existsSellerOrderListCall response:" + existsSellerOrderListCall.getReturnData());
			Logger.verifyEquals(ECode.SUCCESS, existsSellerOrderListCall.getCode(), "验证Code");
			verify();
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	@Test
	@Category(P2.class)
	@TestCase
	public void Tc_ExistsSellerOrderList_006() {
		Logger.start(true,"验证LogisticsTypeList");
		try {
			int SellerId = Integer.valueOf(EnvSetup.getData("SellerId"));
			// 参数
			request.setSellerId(SellerId);
			String BeginTime = YMTDateUtil.getBeforeOrNextDay(-100,YMTDateUtil.YMDTHMS_STRING);
			request.setBeginTime(BeginTime);
			String EndTime = YMTDateUtil.getBeforeOrNextDay(0,YMTDateUtil.YMDTHMS_STRING);
			request.setEndTime(EndTime);
			// 闪购
			request.setIsShangouOrder(false);
			// 物流类型
			ArrayList<Integer> LogisticsTypeList = new ArrayList<Integer>();
			LogisticsTypeList.add(LogisticsTypeEnum.XloboBondedDelivery.getValue());
			LogisticsTypeList.add(LogisticsTypeEnum.PackageDelivery.getValue());
			request.setLogisticsTypeList(LogisticsTypeList);
			existsSellerOrderListCall.setData(request);
			existsSellerOrderListCall.callService();
			Logger.comment("existsSellerOrderListCall send:" + existsSellerOrderListCall.getEntityString());
			Logger.comment("existsSellerOrderListCall response:" + existsSellerOrderListCall.getReturnData());
			Logger.verifyEquals(ECode.SUCCESS, existsSellerOrderListCall.getCode(), "验证Code");
			verify();
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	@Test
	@Category(P2.class)
	@TestCase
	public void Tc_ExistsSellerOrderList_007() {
		Logger.start(true,"验证订单状态为101的订单筛选");
		try {
			int SellerId = Integer.valueOf(EnvSetup.getData("SellerId"));
			// 参数
			request.setSellerId(SellerId);
			String BeginTime = YMTDateUtil.getBeforeOrNextDay(-100,YMTDateUtil.YMDTHMS_STRING);
			request.setBeginTime(BeginTime);
			String EndTime = YMTDateUtil.getBeforeOrNextDay(-1,YMTDateUtil.YMDTHMS_STRING);
			request.setEndTime(EndTime);
			// 订单状态
			ArrayList<Integer> OrderStatusList = new ArrayList<Integer>();
			OrderStatusList.add(OrderStatusEnum.OrderPostPay.getValue());
			request.setOrderStatusList(OrderStatusList);
			// 发送请求
			existsSellerOrderListCall.setData(request);
			existsSellerOrderListCall.callService();
			Logger.comment("existsSellerOrderListCall send:" + existsSellerOrderListCall.getEntityString());
			Logger.comment("existsSellerOrderListCall response:" + existsSellerOrderListCall.getReturnData());
			Logger.verifyEquals(ECode.SUCCESS, existsSellerOrderListCall.getCode(), "验证Code");
			verify();
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	@Test
	@Category(P2.class)
	@TestCase
	public void Tc_ExistsSellerOrderList_008() {
		Logger.start(true,"验证订单状态为17的订单筛选");
		try {
			int SellerId = Integer.valueOf(EnvSetup.getData("SellerId"));
			// 参数
			request.setSellerId(SellerId);
			String BeginTime = YMTDateUtil.getBeforeOrNextDay(-100,YMTDateUtil.YMDTHMS_STRING);
			request.setBeginTime(BeginTime);
			String EndTime = YMTDateUtil.getBeforeOrNextDay(-1,YMTDateUtil.YMDTHMS_STRING);
			request.setEndTime(EndTime);
			// 订单状态
			ArrayList<Integer> OrderStatusList = new ArrayList<Integer>();
			OrderStatusList.add(OrderStatusEnum.SellerAccept.getValue());
			request.setOrderStatusList(OrderStatusList);
			// 发送请求
			existsSellerOrderListCall.setData(request);
			existsSellerOrderListCall.callService();
			Logger.comment("existsSellerOrderListCall send:" + existsSellerOrderListCall.getEntityString());
			Logger.comment("existsSellerOrderListCall response:" + existsSellerOrderListCall.getReturnData());
			Logger.verifyEquals(ECode.SUCCESS, existsSellerOrderListCall.getCode(), "验证Code");
			verify();
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	@Test
	@Category(P3.class)
	@TestCase
	public void Tc_ExistsSellerOrderList_009() {
		Logger.start(true,"验证订单状态为不存在的状态的订单筛选");
		try {
			int SellerId = Integer.valueOf(EnvSetup.getData("SellerId"));
			// 参数
			request.setSellerId(SellerId);
			String BeginTime = YMTDateUtil.getBeforeOrNextDay(-100,YMTDateUtil.YMDTHMS_STRING);
			request.setBeginTime(BeginTime);
			String EndTime = YMTDateUtil.getBeforeOrNextDay(-1,YMTDateUtil.YMDTHMS_STRING);
			request.setEndTime(EndTime);
			// 订单状态
			ArrayList<Integer> OrderStatusList = new ArrayList<Integer>();
			OrderStatusList.add(404);
			request.setOrderStatusList(OrderStatusList);
			// 发送请求
			existsSellerOrderListCall.setData(request);
			existsSellerOrderListCall.callService();
			Logger.comment("existsSellerOrderListCall send:" + existsSellerOrderListCall.getEntityString());
			Logger.comment("existsSellerOrderListCall response:" + existsSellerOrderListCall.getReturnData());
			Logger.verifyEquals(ECode.SUCCESS, existsSellerOrderListCall.getCode(), "验证Code");
			verify();
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	@Test
	@Category(P2.class)
	@TestCase
	public void Tc_ExistsSellerOrderList_010() {
		Logger.start(true,"验证订单类型筛选");
		try {
			int SellerId = Integer.valueOf(EnvSetup.getData("SellerId"));
			// 参数
			request.setSellerId(SellerId);
			String BeginTime = YMTDateUtil.getBeforeOrNextDay(-100,YMTDateUtil.YMDTHMS_STRING);
			request.setBeginTime(BeginTime);
			String EndTime = YMTDateUtil.getBeforeOrNextDay(-1,YMTDateUtil.YMDTHMS_STRING);
			request.setEndTime(EndTime);
			// 订单类型
			ArrayList<Integer> OrderTypeList = new ArrayList<Integer>();
			OrderTypeList.add(OrderTypeEnum.Purchasing.getValue());
			request.setOrderTypeList(OrderTypeList);
			// 发送请求
			existsSellerOrderListCall.setData(request);
			existsSellerOrderListCall.callService();
			Logger.comment("existsSellerOrderListCall send:" + existsSellerOrderListCall.getEntityString());
			Logger.comment("existsSellerOrderListCall response:" + existsSellerOrderListCall.getReturnData());
			Logger.verifyEquals(ECode.SUCCESS, existsSellerOrderListCall.getCode(), "验证Code");
			verify();
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	@Test
	@Category(P2.class)
	@TestCase
	public void Tc_ExistsSellerOrderList_011() {
		Logger.start(true,"验证[订单状态对应的超时时间]的筛选,key=1");
		try {
			int SellerId = Integer.valueOf(EnvSetup.getData("SellerId"));
			// 参数
			request.setSellerId(SellerId);
			String BeginTime = YMTDateUtil.getBeforeOrNextDay(-100,YMTDateUtil.YMDTHMS_STRING);
			request.setBeginTime(BeginTime);
			String EndTime = YMTDateUtil.getBeforeOrNextDay(-1,YMTDateUtil.YMDTHMS_STRING);
			request.setEndTime(EndTime);
			// 订单状态对应的超时时间
			HashMap<Integer, String> map = new HashMap<Integer, String>();
			map.put(1, "20*30");
			request.setOverTimeLimitDic(map);
			// 发送请求
			existsSellerOrderListCall.setData(request);
			existsSellerOrderListCall.callService();
			Logger.comment("existsSellerOrderListCall send:" + existsSellerOrderListCall.getEntityString());
			Logger.comment("existsSellerOrderListCall response:" + existsSellerOrderListCall.getReturnData());
			Logger.verifyEquals(ECode.SUCCESS, existsSellerOrderListCall.getCode(), "验证Code");
			verify();
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	@Test
	@Category(P2.class)
	@TestCase
	public void Tc_ExistsSellerOrderList_012() {
		Logger.start(true,"验证[PackageDeliveryDomesticStatusFilter],filter.setDomesticDelivered(true),filter.setDomesticUndelivered(false)");
		try {
			int SellerId = Integer.valueOf(EnvSetup.getData("SellerId"));
			// 参数
			request.setSellerId(SellerId);
			String BeginTime = YMTDateUtil.getBeforeOrNextDay(-100,YMTDateUtil.YMDTHMS_STRING);
			request.setBeginTime(BeginTime);
			String EndTime = YMTDateUtil.getBeforeOrNextDay(-1,YMTDateUtil.YMDTHMS_STRING);
			request.setEndTime(EndTime);
			PackageDeliveryDomesticStatusFilter filter = new PackageDeliveryDomesticStatusFilter();
			filter.setDomesticDelivered(true);
			filter.setDomesticUndelivered(false);
			request.setPackageDeliveryDomesticStatusFilter(filter);
			// 发送请求
			existsSellerOrderListCall.setData(request);
			existsSellerOrderListCall.callService();
			Logger.comment("existsSellerOrderListCall send:" + existsSellerOrderListCall.getEntityString());
			Logger.comment("existsSellerOrderListCall response:" + existsSellerOrderListCall.getReturnData());
			Logger.verifyEquals(ECode.SUCCESS, existsSellerOrderListCall.getCode(), "验证Code");
			verify();
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	@Test
	@Category(P2.class)
	@TestCase
	public void Tc_ExistsSellerOrderList_013() {
		Logger.start(true,"验证[PackageDeliveryDomesticStatusFilter],filter.setDomesticDelivered(false),filter.setDomesticUndelivered(true)");
		try {
			int SellerId = Integer.valueOf(EnvSetup.getData("SellerId"));
			// 参数
			request.setSellerId(SellerId);
			String BeginTime = YMTDateUtil.getBeforeOrNextDay(-100,YMTDateUtil.YMDTHMS_STRING);
			request.setBeginTime(BeginTime);
			String EndTime = YMTDateUtil.getBeforeOrNextDay(-1,YMTDateUtil.YMDTHMS_STRING);
			request.setEndTime(EndTime);
			PackageDeliveryDomesticStatusFilter filter = new PackageDeliveryDomesticStatusFilter();
			filter.setDomesticDelivered(false);
			filter.setDomesticUndelivered(true);
			request.setPackageDeliveryDomesticStatusFilter(filter);
			// 发送请求
			existsSellerOrderListCall.setData(request);
			existsSellerOrderListCall.callService();
			Logger.comment("existsSellerOrderListCall send:" + existsSellerOrderListCall.getEntityString());
			Logger.comment("existsSellerOrderListCall response:" + existsSellerOrderListCall.getReturnData());
			Logger.verifyEquals(ECode.SUCCESS, existsSellerOrderListCall.getCode(), "验证Code");
			verify();
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	
	@Test
	@Category(P2.class)
	@TestCase
	public void Tc_ExistsSellerOrderList_014() {
		Logger.start(true,"验证[PackageDeliveryDomesticStatusFilter],filter.setDomesticDelivered(false),filter.setDomesticUndelivered(false)");
		try {
			int SellerId = Integer.valueOf(EnvSetup.getData("SellerId"));
			// 参数
			request.setSellerId(SellerId);
			String BeginTime = YMTDateUtil.getBeforeOrNextDay(-100,YMTDateUtil.YMDTHMS_STRING);
			request.setBeginTime(BeginTime);
			String EndTime = YMTDateUtil.getBeforeOrNextDay(-1,YMTDateUtil.YMDTHMS_STRING);
			request.setEndTime(EndTime);
			PackageDeliveryDomesticStatusFilter filter = new PackageDeliveryDomesticStatusFilter();
			filter.setDomesticDelivered(false);
			filter.setDomesticUndelivered(false);
			request.setPackageDeliveryDomesticStatusFilter(filter);
			// 发送请求
			existsSellerOrderListCall.setData(request);
			existsSellerOrderListCall.callService();
			Logger.comment("existsSellerOrderListCall send:" + existsSellerOrderListCall.getEntityString());
			Logger.comment("existsSellerOrderListCall response:" + existsSellerOrderListCall.getReturnData());
			Logger.verifyEquals(ECode.SUCCESS, existsSellerOrderListCall.getCode(), "验证Code");
			verify();
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	@Test
	@Category(P2.class)
	@TestCase
	public void Tc_ExistsSellerOrderList_015() {
		Logger.start(true,"验证SalesRefundOrderOnly=true的筛选");
		try {
			int SellerId = Integer.valueOf(EnvSetup.getData("SellerId"));
			// 参数
			request.setSellerId(SellerId);
			String BeginTime = YMTDateUtil.getBeforeOrNextDay(-100,YMTDateUtil.YMDTHMS_STRING);
			request.setBeginTime(BeginTime);
			String EndTime = YMTDateUtil.getBeforeOrNextDay(-1,YMTDateUtil.YMDTHMS_STRING);
			request.setEndTime(EndTime);
			request.setSalesRefundOrderOnly(true);
			// 发送请求
			existsSellerOrderListCall.setData(request);
			existsSellerOrderListCall.callService();
			Logger.comment("existsSellerOrderListCall send:" + existsSellerOrderListCall.getEntityString());
			Logger.comment("existsSellerOrderListCall response:" + existsSellerOrderListCall.getReturnData());
			Logger.verifyEquals(ECode.SUCCESS, existsSellerOrderListCall.getCode(), "验证Code");
			verify();
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
}